home *** CD-ROM | disk | FTP | other *** search
/ Sound Fx / Sound Fx.iso / Software / UNZIPED / MPW181-5 / _SETUP.1 / huffman.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-19  |  2.4 KB  |  57 lines

  1. /* huffman.h
  2.  
  3.     Adapted from the ISO MPEG Audio Subgroup Software Simulation
  4.    Group's public c source for its MPEG audio decoder. Miscellaneous
  5.    changes by Jeff Tsay (ctsay@pasteur.eecs.berkeley.edu).
  6.  
  7.    Last modified : 04/19/97 */
  8.  
  9. /**********************************************************************
  10. Copyright (c) 1991 MPEG/audio software simulation group, All Rights Reserved
  11. huffman.h
  12. **********************************************************************/
  13. /**********************************************************************
  14.  * MPEG/audio coding/decoding software, work in progress              *
  15.  *   NOT for public distribution until verified and approved by the   *
  16.  *   MPEG/audio committee.  For further information, please contact   *
  17.  *   Davis Pan, 508-493-2241, e-mail: pan@3d.enet.dec.com             *
  18.  *                                                                    *
  19.  * VERSION 4.1                                                        *
  20.  *   changes made since last update:                                  *
  21.  *   date   programmers                comment                        *
  22.  *  27.2.92 F.O.Witte (ITT Intermetall)                                   *
  23.  *  8/24/93 M. Iwadare          Changed for 1 pass decoding.          *
  24.  *  7/14/94 J. Koller        useless 'typedef' before huffcodetab           *
  25.  *                removed                                                                   *
  26.  *********************************************************************/
  27.  
  28. #ifndef HUFFMAN_H
  29. #define HUFFMAN_H
  30.  
  31. #include "all.h"
  32. #include "bit_res.h"
  33.  
  34. #define HUFFBITS uint32
  35. #define HTN    34
  36. #define MXOFF    250
  37.  
  38. struct huffcodetab {
  39.   char tablename[3];            /* string, containing table_description   */
  40.   uint32 xlen;                 /* max. x-index+                               */
  41.   uint32 ylen;                /* max. y-index+                               */
  42.   uint32 linbits;             /* number of linbits                           */
  43.   uint32 linmax;                /* max number to be stored in linbits       */
  44.   int32 ref;                    /* a positive value indicates a reference */
  45.   HUFFBITS *table;            /* pointer to array[xlen][ylen]              */
  46.   unsigned char *hlen;        /* pointer to array[xlen][ylen]              */
  47.   unsigned char(*val)[2];    /* decoder tree                               */
  48.   uint32 treelen;                /* length of decoder tree                    */
  49. };
  50.  
  51. extern struct huffcodetab ht[HTN];
  52.  
  53. int32 huffman_decoder(struct huffcodetab *h, int32 *x, int32 *y, int32 *v,
  54.                       int32 *w, Bit_Reserve *br);
  55.  
  56. #endif
  57.